package com.zlzxm.sorting.ui.activity

import androidx.recyclerview.widget.GridLayoutManager
import androidx.viewbinding.ViewBinding
import com.zlzxm.sorting.databinding.AcCaoZuoProductBinding
import com.zlzxm.sorting.ui.adapter.AdapterCaozuoProduct
import com.zlzxm.sorting.ui.adapter.entity.EntityCaozuo
import com.zlzxm.sorting.util.ui.manager.AbsAcBase

class AcCaoZuoProduct : AbsAcBase(){

    val binding by lazy {

        AcCaoZuoProductBinding.inflate(layoutInflater)
    }

    val adapter = AdapterCaozuoProduct()

    override fun initBinding(): ViewBinding? {

        return binding
    }

    override fun initViewModel() {
    }

    override fun initView() {
//        fullScreenMode()
        binding.rv.layoutManager= GridLayoutManager(this,4)
        binding.rv.adapter = adapter
    }

    override fun initData() {

        val list = mutableListOf<EntityCaozuo>()
        list.add(EntityCaozuo(1,"大包菜"))
        list.add(EntityCaozuo(1,"大包菜"))
        list.add(EntityCaozuo(1,"大包菜"))
        list.add(EntityCaozuo(1,"大包菜"))
        list.add(EntityCaozuo(1,"大包菜"))
        list.add(EntityCaozuo(1,"大包菜"))
        adapter.setNewInstance(list)

    }
}